class Live < ActiveRecord::Base
  belongs_to :musician
  belongs_to :livehouses

  attr_human_name :name => 'ライブ名', :start => 'start', :end => 'end', :movie => '動画', :image => '画像'
  file_column :image,
    :magick => {:versions => {
      :small  => {:size => "75x100"},
      :large  => {:size => "320x240"}
    }
  }
  file_column :movie
  validates_presence_of :name
  validates_file_format_of(:image, :in => ["gif", "png", "jpg"], :message => "はGIF,JPG,PNG画像でなければなりません")
  validates_file_format_of(:movie, :in => ["mov", "wmv", "avi", "mp4", "flv"], :message => "はmov,wmv,avi,mp4,flv動画でなければなりません")
end
